<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>v-bind属性绑定</title>
</head>

<body>
    <pre>
   v-bind:加上属性 或者 :加上属性
    </pre>
    <div class="app">
        <a v-bind:href="url" target="_blank">点击搜索</a>
        <a :href="url" target="_blank">点击搜索2</a>
        <button v-on:click="handle">切换</button>
    </div>
    <script src="./js/vue.js"></script>
    <script>
        var xm = new Vue({
            el: '.app',
            data: {
                url: 'https://www.baidu.com/'
            },
            methods: {
                handle () {
                    this.url = 'https://www.hao123.com/'
                }
            }
              
        })

    </script>
</body>

</html>